<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增举报信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-report-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">被举报帖子id：</label>
                <div class="col-sm-8">
                    <input name="postsId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">被举报内容：</label>
                <div class="col-sm-8">
                    <textarea name="postsComment" class="form-control"></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">举报类型：</label>
                <div class="col-sm-8">
                    <select name="reportType" class="form-control m-b" th:with="type=${@dict.getType('sys_report_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">举报内容：</label>
                <div class="col-sm-8">
                    <textarea name="reportComment" class="form-control"></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">举报者id：</label>
                <div class="col-sm-8">
                    <input name="reportUserId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">反馈信息：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_posts_status')}">
                        <input type="radio" th:id="${'feedback_' + dict.dictCode}" name="feedback" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'feedback_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/report"
        $("#form-report-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-report-add').serialize());
            }
        }
    </script>
</body>
</html>